#include "Process.h"

#define STYLE '#'
char Rotate[5] = "\\/-|"; 



void process(double total,double download)
{
	char buff[101] = "\0";
	int start = 0;
	int end = (int)download * 100 / total;

	for(int i = 0;i < end;++i)
	{
		buff[i] = STYLE;
	}
	printf("[%-100s] [%.2lf%%] [%c]\r",buff,(double)download * 100 / total ,Rotate[end % 4]);	
	fflush(stdout);
}
